package com.mapper;

import com.pojo.Owners;
import com.vo.OwnersVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OwnersMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Owners record);

    int insertSelective(Owners record);

    Owners selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Owners record);

    int updateByPrimaryKey(Owners record);



    int selectbyname1(String name);

    int selectbyname(String name);

    String selectphonebyname(Integer ownerid);

    /**
     * 根据身份证号查询数量
     */
    Owners selectownerBycardno(String cardno);
    /**
     * 修改isno根据id
     */
    int updateIsnoBycardno(@Param("id") int id,@Param("isno") int isno);

    /**
     * 查询业主信息
     */
    public List<Owners> selectownerall(OwnersVo ownersVo);

    /**
     * 根据手机号查询id
     */
    public Owners selectidByphone(String phone);


    public Owners selectOwnerByName(String ownername);

    public Owners selectOwnerById(Integer id);

    /**
     * 根据plotid查询总人数
     */
    public int selecttotalownerByplotid(Integer plotid);

    /***
     * 根据电话查询业主
     * @param phone
     * @return
     */
    public Owners selectOwnerByPhone(String phone);

    /***
     * 查询所有业主
     * @return
     */
    public List<Owners> selectAllOwner();

    public List<Owners> selectOwnerHaveCar(List<Integer> ownerid);

    /**
     * 根据姓名查询id
     */
    public List<Integer> selectidbyownername(String name);

}